<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: arm_compute/core/GLES_COMPUTE/GCKernelLibrary.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Compute Library
   &#160;<span id="projectnumber">18.03</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
      <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.xhtml"><span>File&#160;List</span></a></li>
      <li><a href="globals.xhtml"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_g_c_kernel_library_8h_source.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">GCKernelLibrary.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_g_c_kernel_library_8h.xhtml">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2017 ARM Limited.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * SPDX-License-Identifier: MIT</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * of this software and associated documentation files (the &quot;Software&quot;), to</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * deal in the Software without restriction, including without limitation the</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * sell copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * copies or substantial portions of the Software.</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> * SOFTWARE.</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#ifndef __ARM_COMPUTE_GCKERNELLIBRARY_H__</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#define __ARM_COMPUTE_GCKERNELLIBRARY_H__</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_open_g_l_e_s_8h.xhtml">arm_compute/core/GLES_COMPUTE/OpenGLES.h</a>&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="arm__compute_2core_2_utils_8h.xhtml">arm_compute/core/Utils.h</a>&quot;</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;map&gt;</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &lt;set&gt;</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &lt;utility&gt;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacearm__compute.xhtml">arm_compute</a></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;{</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_g_c_program.xhtml">   39</a></span>&#160;<span class="keyword">class </span><a class="code" href="classarm__compute_1_1_g_c_program.xhtml">GCProgram</a></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;{</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <a class="code" href="classarm__compute_1_1_g_c_program.xhtml#aca45a2e24e9ad0a4ebaf2964589a6934">GCProgram</a>();</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <a class="code" href="classarm__compute_1_1_g_c_program.xhtml#aca45a2e24e9ad0a4ebaf2964589a6934">GCProgram</a>(std::string <a class="code" href="classarm__compute_1_1_g_c_program.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">name</a>, std::string source);</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <a class="code" href="classarm__compute_1_1_g_c_program.xhtml#aca45a2e24e9ad0a4ebaf2964589a6934">GCProgram</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_g_c_program.xhtml">GCProgram</a> &amp;) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <a class="code" href="classarm__compute_1_1_g_c_program.xhtml#aca45a2e24e9ad0a4ebaf2964589a6934">GCProgram</a>(<a class="code" href="classarm__compute_1_1_g_c_program.xhtml">GCProgram</a> &amp;&amp;) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <a class="code" href="classarm__compute_1_1_g_c_program.xhtml">GCProgram</a> &amp;<a class="code" href="classarm__compute_1_1_g_c_program.xhtml#a4212dc2dbdd340faeba056d37cb912de">operator=</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_g_c_program.xhtml">GCProgram</a> &amp;) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <a class="code" href="classarm__compute_1_1_g_c_program.xhtml">GCProgram</a> &amp;<a class="code" href="classarm__compute_1_1_g_c_program.xhtml#a4212dc2dbdd340faeba056d37cb912de">operator=</a>(<a class="code" href="classarm__compute_1_1_g_c_program.xhtml">GCProgram</a> &amp;&amp;) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_g_c_program.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">   62</a></span>&#160;    std::string <a class="code" href="classarm__compute_1_1_g_c_program.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">name</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="keyword">    </span>{</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        <span class="keywordflow">return</span> _name;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    }</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    GLuint <a class="code" href="classarm__compute_1_1_g_c_program.xhtml#a5b4af3fb9839027279876a231a328ec9">link_program</a>(GLuint shader);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    GLuint <a class="code" href="classarm__compute_1_1_g_c_program.xhtml#acab405c2120743ab9e063930064a6b0a">compile_shader</a>(<span class="keyword">const</span> std::string &amp;build_options);</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    std::string _name;   </div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    std::string _source; </div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;};</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_g_c_kernel.xhtml">   87</a></span>&#160;<span class="keyword">class </span><a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml">GCKernel</a></div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;{</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml">GCKernel</a>();</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml">GCKernel</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml">GCKernel</a> &amp;) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml">GCKernel</a>(<a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml">GCKernel</a> &amp;&amp;) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml">GCKernel</a> &amp;<a class="code" href="classarm__compute_1_1_g_c_program.xhtml#a4212dc2dbdd340faeba056d37cb912de">operator=</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml">GCKernel</a> &amp;) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml">GCKernel</a> &amp;<a class="code" href="classarm__compute_1_1_g_c_program.xhtml#a4212dc2dbdd340faeba056d37cb912de">operator=</a>(<a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml">GCKernel</a> &amp;&amp;) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml">GCKernel</a>(std::string <a class="code" href="classarm__compute_1_1_g_c_program.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">name</a>, GLuint program);</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    ~<a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml">GCKernel</a>();</div><div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_g_c_kernel.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">  113</a></span>&#160;    std::string <a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">name</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="keyword">    </span>{</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <span class="keywordflow">return</span> _name;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    }</div><div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_g_c_kernel.xhtml#a0e887398d1ed8b689b857dc6be5aa206">  121</a></span>&#160;    GLuint <a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml#a0e887398d1ed8b689b857dc6be5aa206">get_program</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="keyword">    </span>{</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        <span class="keywordflow">return</span> _program;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    }</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <span class="keywordtype">void</span> use();</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="keywordtype">void</span> unuse();</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;</div><div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_g_c_kernel.xhtml#ad5cfd50c152f0aa984f53bb034d1461b">  141</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml#ad5cfd50c152f0aa984f53bb034d1461b">set_argument</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> idx, T <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a>)</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    {</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        <span class="keywordflow">if</span>(idx &gt;= _shader_arguments.size())</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        {</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;            _shader_arguments.resize(idx + 1, 0);</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;        }</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *p        = <span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *<span class="keyword">&gt;</span>(&amp;<a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a>);</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        _shader_arguments[idx] = *p;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    }</div><div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_g_c_kernel.xhtml#a2ff24cc62df8324f57dcc2f3c9e533a9">  154</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml#a2ff24cc62df8324f57dcc2f3c9e533a9">clear_arguments</a>()</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    {</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        _shader_arguments.clear();</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    }</div><div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_g_c_kernel.xhtml#ae722344eb4eb8a404d600561914859ab">  162</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml#ae722344eb4eb8a404d600561914859ab">set_shader_params_binding_point</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> binding)</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    {</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        _shader_params_binding_point = binding;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    }</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <span class="keywordtype">void</span> update_shader_params();</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <span class="keywordtype">void</span> cleanup();</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    std::string                  _name;                                 </div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    GLuint                       _program;                              </div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    std::vector&lt;unsigned int&gt;    _shader_arguments;                     </div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    GLuint                       _shader_params_ubo_name;               </div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    GLuint                       _shader_params_binding_point;          </div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    GLuint                       _shader_params_index;                  </div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    GLint                        _shader_params_size;                   </div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    <span class="keyword">static</span> constexpr <span class="keyword">const</span> <span class="keywordtype">char</span> *_shader_params_name = <span class="stringliteral">&quot;shader_params&quot;</span>; </div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;};</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_g_c_kernel_library.xhtml">  187</a></span>&#160;<span class="keyword">class </span><a class="code" href="classarm__compute_1_1_g_c_kernel_library.xhtml">GCKernelLibrary</a></div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;{</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    <span class="keyword">using</span> StringSet = std::set&lt;std::string&gt;;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    <a class="code" href="classarm__compute_1_1_g_c_kernel_library.xhtml">GCKernelLibrary</a>();</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    ~<a class="code" href="classarm__compute_1_1_g_c_kernel_library.xhtml">GCKernelLibrary</a>();</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    <a class="code" href="classarm__compute_1_1_g_c_kernel_library.xhtml">GCKernelLibrary</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_g_c_kernel_library.xhtml">GCKernelLibrary</a> &amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_g_c_kernel_library.xhtml">GCKernelLibrary</a> &amp;<a class="code" href="classarm__compute_1_1_g_c_program.xhtml#a4212dc2dbdd340faeba056d37cb912de">operator=</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_g_c_kernel_library.xhtml">GCKernelLibrary</a> &amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    <span class="keyword">static</span> <a class="code" href="classarm__compute_1_1_g_c_kernel_library.xhtml">GCKernelLibrary</a> &amp;<span class="keyword">get</span>();</div><div class="line"><a name="l00209"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_g_c_kernel_library.xhtml#abe24625d55f2fb35da7e293e5e28d483">  209</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1_g_c_kernel_library.xhtml#abe24625d55f2fb35da7e293e5e28d483">init</a>(std::string shader_path = <span class="stringliteral">&quot;./&quot;</span>, EGLDisplay dpy = EGL_NO_DISPLAY, EGLContext ctx = EGL_NO_CONTEXT)</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    {</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;        _shader_path = std::move(shader_path);</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        _display = dpy;</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;        _context = ctx;</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;        eglMakeCurrent(_display, EGL_NO_SURFACE, EGL_NO_SURFACE, _context);</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        setup_dummy_fbo();</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    }</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;</div><div class="line"><a name="l00224"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_g_c_kernel_library.xhtml#a1d39c8fd9605c241b797dcbd9d3cc474">  224</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1_g_c_kernel_library.xhtml#a1d39c8fd9605c241b797dcbd9d3cc474">set_shader_path</a>(<span class="keyword">const</span> std::string &amp;shader_path)</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    {</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;        _shader_path = shader_path;</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;    };</div><div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_g_c_kernel_library.xhtml#adad9a34e26a1a1b6574057981a1f7bb3">  233</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1_g_c_kernel_library.xhtml#adad9a34e26a1a1b6574057981a1f7bb3">set_context</a>(EGLDisplay dpy, EGLContext ctx)</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    {</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;        _display = dpy;</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;        _context = ctx;</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;        eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, ctx);</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        setup_dummy_fbo();</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    };</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;    <a class="code" href="classarm__compute_1_1_g_c_kernel.xhtml">GCKernel</a> <a class="code" href="namespacearm__compute.xhtml#abc72c95941485d8a068fa38372308574">create_kernel</a>(<span class="keyword">const</span> std::string &amp;shader_name, <span class="keyword">const</span> StringSet &amp;build_options_set = {}) <span class="keyword">const</span>;</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    <span class="keywordtype">void</span> save_binary();</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;    <span class="keywordtype">void</span> load_binary();</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;    <span class="keywordtype">void</span> setup_dummy_fbo();</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    <span class="keyword">const</span> std::string preprocess_shader(<span class="keyword">const</span> std::string &amp;shader_source) <span class="keyword">const</span>;</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_g_c_program.xhtml">GCProgram</a> &amp;load_program(<span class="keyword">const</span> std::string &amp;program_name) <span class="keyword">const</span>;</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;    std::string stringify_set(<span class="keyword">const</span> StringSet &amp;s) <span class="keyword">const</span>;</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    EGLDisplay  _display;                                                </div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    EGLContext  _context;                                                </div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    GLuint      _frame_buffer;                                           </div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    GLuint      _tex_rt;                                                 </div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    std::string _shader_path;                                            </div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    <span class="keyword">mutable</span> std::map&lt;std::string, const GCProgram&gt;  _programs_map;       </div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    <span class="keyword">mutable</span> std::map&lt;std::string, const GCKernel&gt;   _built_programs_map; </div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> std::map&lt;std::string, std::string&gt; _shader_program_map; </div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> std::map&lt;std::string, std::string&gt; _program_source_map; </div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;};</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;}</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* __ARM_COMPUTE_GCKERNELLIBRARY_H__ */</span><span class="preprocessor"></span></div><div class="ttc" id="classarm__compute_1_1_g_c_program_xhtml_aca45a2e24e9ad0a4ebaf2964589a6934"><div class="ttname"><a href="classarm__compute_1_1_g_c_program.xhtml#aca45a2e24e9ad0a4ebaf2964589a6934">arm_compute::GCProgram::GCProgram</a></div><div class="ttdeci">GCProgram()</div><div class="ttdoc">Default constructor. </div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_kernel_xhtml_a0e887398d1ed8b689b857dc6be5aa206"><div class="ttname"><a href="classarm__compute_1_1_g_c_kernel.xhtml#a0e887398d1ed8b689b857dc6be5aa206">arm_compute::GCKernel::get_program</a></div><div class="ttdeci">GLuint get_program() const </div><div class="ttdoc">Get program id. </div><div class="ttdef"><b>Definition:</b> <a href="_g_c_kernel_library_8h_source.xhtml#l00121">GCKernelLibrary.h:121</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_kernel_library_xhtml_adad9a34e26a1a1b6574057981a1f7bb3"><div class="ttname"><a href="classarm__compute_1_1_g_c_kernel_library.xhtml#adad9a34e26a1a1b6574057981a1f7bb3">arm_compute::GCKernelLibrary::set_context</a></div><div class="ttdeci">void set_context(EGLDisplay dpy, EGLContext ctx)</div><div class="ttdoc">Sets display and context to create kernel. </div><div class="ttdef"><b>Definition:</b> <a href="_g_c_kernel_library_8h_source.xhtml#l00233">GCKernelLibrary.h:233</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_program_xhtml_acab405c2120743ab9e063930064a6b0a"><div class="ttname"><a href="classarm__compute_1_1_g_c_program.xhtml#acab405c2120743ab9e063930064a6b0a">arm_compute::GCProgram::compile_shader</a></div><div class="ttdeci">GLuint compile_shader(const std::string &amp;build_options)</div><div class="ttdoc">Compile shader. </div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_kernel_xhtml"><div class="ttname"><a href="classarm__compute_1_1_g_c_kernel.xhtml">arm_compute::GCKernel</a></div><div class="ttdoc">GCKernel class. </div><div class="ttdef"><b>Definition:</b> <a href="_g_c_kernel_library_8h_source.xhtml#l00087">GCKernelLibrary.h:87</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_program_xhtml"><div class="ttname"><a href="classarm__compute_1_1_g_c_program.xhtml">arm_compute::GCProgram</a></div><div class="ttdoc">GCProgram class. </div><div class="ttdef"><b>Definition:</b> <a href="_g_c_kernel_library_8h_source.xhtml#l00039">GCKernelLibrary.h:39</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml"><div class="ttname"><a href="namespacearm__compute.xhtml">arm_compute</a></div><div class="ttdoc">This file contains all available output stages for GEMMLowp on OpenCL. </div><div class="ttdef"><b>Definition:</b> <a href="00__introduction_8dox_source.xhtml#l00001">00_introduction.dox:1</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_kernel_xhtml_ae722344eb4eb8a404d600561914859ab"><div class="ttname"><a href="classarm__compute_1_1_g_c_kernel.xhtml#ae722344eb4eb8a404d600561914859ab">arm_compute::GCKernel::set_shader_params_binding_point</a></div><div class="ttdeci">void set_shader_params_binding_point(unsigned int binding)</div><div class="ttdoc">Set shader params binding point. </div><div class="ttdef"><b>Definition:</b> <a href="_g_c_kernel_library_8h_source.xhtml#l00162">GCKernelLibrary.h:162</a></div></div>
<div class="ttc" id="arm__compute_2core_2_utils_8h_xhtml"><div class="ttname"><a href="arm__compute_2core_2_utils_8h.xhtml">Utils.h</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_program_xhtml_a37627d5d5bba7f4a8690c71c2ab3cb07"><div class="ttname"><a href="classarm__compute_1_1_g_c_program.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">arm_compute::GCProgram::name</a></div><div class="ttdeci">std::string name() const </div><div class="ttdoc">Returns program name. </div><div class="ttdef"><b>Definition:</b> <a href="_g_c_kernel_library_8h_source.xhtml#l00062">GCKernelLibrary.h:62</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_kernel_library_xhtml_a1d39c8fd9605c241b797dcbd9d3cc474"><div class="ttname"><a href="classarm__compute_1_1_g_c_kernel_library.xhtml#a1d39c8fd9605c241b797dcbd9d3cc474">arm_compute::GCKernelLibrary::set_shader_path</a></div><div class="ttdeci">void set_shader_path(const std::string &amp;shader_path)</div><div class="ttdoc">Sets the path that the shaders reside in. </div><div class="ttdef"><b>Definition:</b> <a href="_g_c_kernel_library_8h_source.xhtml#l00224">GCKernelLibrary.h:224</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_abc72c95941485d8a068fa38372308574"><div class="ttname"><a href="namespacearm__compute.xhtml#abc72c95941485d8a068fa38372308574">arm_compute::create_kernel</a></div><div class="ttdeci">std::unique_ptr&lt; Kernel &gt; create_kernel()</div><div class="ttdoc">Helper function to create and return a unique_ptr pointed to a CL kernel object. </div><div class="ttdef"><b>Definition:</b> <a href="_c_l_helpers_8h_source.xhtml#l00100">CLHelpers.h:100</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_program_xhtml_a5b4af3fb9839027279876a231a328ec9"><div class="ttname"><a href="classarm__compute_1_1_g_c_program.xhtml#a5b4af3fb9839027279876a231a328ec9">arm_compute::GCProgram::link_program</a></div><div class="ttdeci">GLuint link_program(GLuint shader)</div><div class="ttdoc">Link program. </div></div>
<div class="ttc" id="hwc_8hpp_xhtml_a0f61d63b009d0880a89c843bd50d8d76"><div class="ttname"><a href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a></div><div class="ttdeci">void * value</div><div class="ttdef"><b>Definition:</b> <a href="hwc_8hpp_source.xhtml#l00278">hwc.hpp:278</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_kernel_xhtml_a2ff24cc62df8324f57dcc2f3c9e533a9"><div class="ttname"><a href="classarm__compute_1_1_g_c_kernel.xhtml#a2ff24cc62df8324f57dcc2f3c9e533a9">arm_compute::GCKernel::clear_arguments</a></div><div class="ttdeci">void clear_arguments()</div><div class="ttdoc">Clear shader arguments. </div><div class="ttdef"><b>Definition:</b> <a href="_g_c_kernel_library_8h_source.xhtml#l00154">GCKernelLibrary.h:154</a></div></div>
<div class="ttc" id="_open_g_l_e_s_8h_xhtml"><div class="ttname"><a href="_open_g_l_e_s_8h.xhtml">OpenGLES.h</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_kernel_library_xhtml_abe24625d55f2fb35da7e293e5e28d483"><div class="ttname"><a href="classarm__compute_1_1_g_c_kernel_library.xhtml#abe24625d55f2fb35da7e293e5e28d483">arm_compute::GCKernelLibrary::init</a></div><div class="ttdeci">void init(std::string shader_path=&quot;./&quot;, EGLDisplay dpy=EGL_NO_DISPLAY, EGLContext ctx=EGL_NO_CONTEXT)</div><div class="ttdoc">Initialises the kernel library. </div><div class="ttdef"><b>Definition:</b> <a href="_g_c_kernel_library_8h_source.xhtml#l00209">GCKernelLibrary.h:209</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_program_xhtml_a4212dc2dbdd340faeba056d37cb912de"><div class="ttname"><a href="classarm__compute_1_1_g_c_program.xhtml#a4212dc2dbdd340faeba056d37cb912de">arm_compute::GCProgram::operator=</a></div><div class="ttdeci">GCProgram &amp; operator=(const GCProgram &amp;)=default</div><div class="ttdoc">Default copy assignment operator. </div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_kernel_xhtml_ad5cfd50c152f0aa984f53bb034d1461b"><div class="ttname"><a href="classarm__compute_1_1_g_c_kernel.xhtml#ad5cfd50c152f0aa984f53bb034d1461b">arm_compute::GCKernel::set_argument</a></div><div class="ttdeci">void set_argument(unsigned int idx, T value)</div><div class="ttdoc">Set argument value at index of shader params. </div><div class="ttdef"><b>Definition:</b> <a href="_g_c_kernel_library_8h_source.xhtml#l00141">GCKernelLibrary.h:141</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_kernel_library_xhtml"><div class="ttname"><a href="classarm__compute_1_1_g_c_kernel_library.xhtml">arm_compute::GCKernelLibrary</a></div><div class="ttdoc">GCKernelLibrary class. </div><div class="ttdef"><b>Definition:</b> <a href="_g_c_kernel_library_8h_source.xhtml#l00187">GCKernelLibrary.h:187</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_kernel_xhtml_a37627d5d5bba7f4a8690c71c2ab3cb07"><div class="ttname"><a href="classarm__compute_1_1_g_c_kernel.xhtml#a37627d5d5bba7f4a8690c71c2ab3cb07">arm_compute::GCKernel::name</a></div><div class="ttdeci">std::string name() const </div><div class="ttdoc">Returns kernel name. </div><div class="ttdef"><b>Definition:</b> <a href="_g_c_kernel_library_8h_source.xhtml#l00113">GCKernelLibrary.h:113</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_214608ef36d61442cb2b0c1c4e9a7def.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="dir_1fb090f0c6070330bfaccc4236d3ca0d.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_541ebbb21ca179b54b469d645ff46bd9.xhtml">GLES_COMPUTE</a></li><li class="navelem"><a class="el" href="_g_c_kernel_library_8h.xhtml">GCKernelLibrary.h</a></li>
    <li class="footer">Generated on Fri Mar 2 2018 12:37:52 for Compute Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
